<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	renderKitId="AJAX">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
	</w:head>
	<w:page title="编辑资源">
		<layout:panel border="false" autoHeight="true" autoWidth="true" styleClass="k4-form">
			<w:form clientValidate="true">
				<layout:panel border="false" autoHeight="true" styleClass="k4-form-toolbar">
					<w:toolBar>
						<w:button label="保存" id="saveResource" image="#{facesContext.externalContext.requestContextPath}/images/save.gif" />
						<w:separator />
						<w:button label="取消" id="cancel" immediate="true"  image="#{facesContext.externalContext.requestContextPath}/images/cancel.gif"
							onclick="javascript:window.parent.closeWindow()" />
					</w:toolBar>
				</layout:panel>
				<layout:panelGrid columns="2" cellpadding="0" cellspacing="0" border="1"
					styleClass="k4-form-grid">
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="资源值" for="value" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:textField styleClass="k4-form-textfield" id="value" allowBlank="false" required="true"
							msgTarget="under"></w:textField>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="资源名称" for="displayName" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:textField styleClass="k4-form-textfield" id="displayName" allowBlank="false"
							required="true"></w:textField>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="资源代码" for="code" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:textField styleClass="k4-form-textfield" id="code" allowBlank="false" required="true"></w:textField>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="资源类型" for="type" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:combo id="type" allowBlank="false" styleClass="k4-form-comofield" required="true" editable="false">
							<f:selectItem itemValue="URL" itemLabel="链接" />
							<f:selectItem itemValue="METHOD" itemLabel="方法" />
						</w:combo>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="资源描述" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:textArea styleClass="k4-form-textfield" id="description" clientValidate="true" width="300"
							height="100" maxLength="500" msgTarget="under"></w:textArea>
					</layout:cell>	
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="所属模块" for="module" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:textField styleClass="k4-form-textfield" id="module"></w:textField>
					</layout:cell>				
					<layout:cell style="display:none;">
						<w:numberField id="id" style="display:none;"></w:numberField> 
					</layout:cell>
				</layout:panelGrid>
			</w:form>
		</layout:panel>
	</w:page>
</f:view>